﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="orderlist.aspx.cs" Inherits="OF.Web.user.orderlist" %>

<%@ Register Assembly="OF.Controls" Namespace="OF.Controls" TagPrefix="cc1" %>
<%@ Register Src="~/user/controls/left.ascx" TagPrefix="uc1" TagName="left" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">

        <uc1:left runat="server" ID="left" />

        <div>

            <table>
                <tr>
                    <td>订单号/联系方式:</td>
                    <td>
                        <cc1:OFTextBox ID="txtkey" runat="server"></cc1:OFTextBox>
                    </td>
                    <td>状态:</td>
                    <td>
                        <cc1:OFDropDownList ID="ddlState" runat="server" SearcherGroupName="basic" SqlCharacter="等于"
                            SqlField="state">
                            <asp:ListItem Value="">全部</asp:ListItem>
                            <asp:ListItem Value="0">待处理</asp:ListItem>
                            <asp:ListItem Value="1">处理中</asp:ListItem>
                            <asp:ListItem Value="2">已完成</asp:ListItem>
                            <asp:ListItem Value="3">取消</asp:ListItem>
                            <asp:ListItem Value="4">失效</asp:ListItem>
                        </cc1:OFDropDownList>
                    </td>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="搜索" CssClass="btn btn-info" />
                    </td>
                </tr>
            </table>

            <table>
                <thead>
                    <tr>
                        <th>编号</th>
                        <th>订单号</th>
                        <th>联系方式</th>
                        <th>订单类型</th>
                        <th>总额</th>
                        <th>下单时间</th>
                        <th>当前状态</th>
                        <th>编辑</th>
                    </tr>
                </thead>
                <tbody>
                    <asp:Repeater ID="rptList" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td><%#Eval("id") %></td>
                                <td><%#Eval("ordersn") %></td>
                                <td><%#Eval("phone") %></td>
                                <td><%#Eval("ordertype").ToString()=="1"?"外卖":"点餐" %></td>
                                <td><%#Eval("allprice") %></td>
                                <td><%#Eval("addtime") %></td>
                                <td><%#GetState(Eval("state"),Eval("id")) %></td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>


            <%--分页--%>
            <cc1:OFPager ID="OFPager" runat="server" OnPageChanged="Pager_PageChanged" PageSize="10"/>

        </div>
    </form>
</body>
</html>


